<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateOrderOmsTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_orderid}" for="orderid" />
                    <h:inputText id="orderid" value="#{orderOmsController.selected.orderid}" title="#{bundle.CreateOrderOmsTitle_orderid}" required="true" requiredMessage="#{bundle.CreateOrderOmsRequiredMessage_orderid}"/>
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_creditcardid}" for="creditcardid" />
                    <h:inputText id="creditcardid" value="#{orderOmsController.selected.creditcardid}" title="#{bundle.CreateOrderOmsTitle_creditcardid}" required="true" requiredMessage="#{bundle.CreateOrderOmsRequiredMessage_creditcardid}"/>
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_orderdate}" for="orderdate" />
                    <h:inputText id="orderdate" value="#{orderOmsController.selected.orderdate}" title="#{bundle.CreateOrderOmsTitle_orderdate}" required="true" requiredMessage="#{bundle.CreateOrderOmsRequiredMessage_orderdate}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_orderprice}" for="orderprice" />
                    <h:inputText id="orderprice" value="#{orderOmsController.selected.orderprice}" title="#{bundle.CreateOrderOmsTitle_orderprice}" required="true" requiredMessage="#{bundle.CreateOrderOmsRequiredMessage_orderprice}"/>
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_ordersource}" for="ordersource" />
                    <h:inputText id="ordersource" value="#{orderOmsController.selected.ordersource}" title="#{bundle.CreateOrderOmsTitle_ordersource}" required="true" requiredMessage="#{bundle.CreateOrderOmsRequiredMessage_ordersource}"/>
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_orderstatus}" for="orderstatus" />
                    <h:inputText id="orderstatus" value="#{orderOmsController.selected.orderstatus}" title="#{bundle.CreateOrderOmsTitle_orderstatus}" required="true" requiredMessage="#{bundle.CreateOrderOmsRequiredMessage_orderstatus}"/>
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_ordercomments}" for="ordercomments" />
                    <h:inputText id="ordercomments" value="#{orderOmsController.selected.ordercomments}" title="#{bundle.CreateOrderOmsTitle_ordercomments}" />
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_estimateddelivery}" for="estimateddelivery" />
                    <h:inputText id="estimateddelivery" value="#{orderOmsController.selected.estimateddelivery}" title="#{bundle.CreateOrderOmsTitle_estimateddelivery}" >
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_shippingcompanyid}" for="shippingcompanyid" />
                    <h:selectOneMenu id="shippingcompanyid" value="#{orderOmsController.selected.shippingcompanyid}" title="#{bundle.CreateOrderOmsTitle_shippingcompanyid}" >
                        <f:selectItems value="#{shippingcompanyController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_customerid}" for="customerid" />
                    <h:selectOneMenu id="customerid" value="#{orderOmsController.selected.customerid}" title="#{bundle.CreateOrderOmsTitle_customerid}" required="true" requiredMessage="#{bundle.CreateOrderOmsRequiredMessage_customerid}">
                        <f:selectItems value="#{customerController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateOrderOmsLabel_addressid}" for="addressid" />
                    <h:selectOneMenu id="addressid" value="#{orderOmsController.selected.addressid}" title="#{bundle.CreateOrderOmsTitle_addressid}" required="true" requiredMessage="#{bundle.CreateOrderOmsRequiredMessage_addressid}">
                        <f:selectItems value="#{addressController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{orderOmsController.create}" value="#{bundle.CreateOrderOmsSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{orderOmsController.prepareList}" value="#{bundle.CreateOrderOmsShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateOrderOmsIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
